import service from '@/utils/request'

const baseUrl = '/networkflow'
export const listVideo = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_videolist',
    method: 'get',
    params
  })
}

export const getStatus = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_infolist',
    method: 'get',
    params
  })
}
export const getFlow = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_flowlist',
    method: 'get',
    params
  })
}

export const setParam = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_param',
    method: 'post',
    params
  })
}
export const visit = (data) => {
  return service({
    url: baseUrl + '/video/cluster/_visit',
    method: 'post',
    data
  })
}

export const visitHistory = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_visithistory',
    method: 'get',
    params
  })
}

export const flowDetail = (params) => {
  return service({
    url: baseUrl + '/video/collector/_flow',
    method: 'get',
    params
  })
}

export const getName = (params) => {
  return service({
    url: baseUrl + '/video/collector/_name',
    method: 'get',
    params
  })
}
export const deleteVideo = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_deletevideo',
    method: 'post',
    params
  })
}

export const getPieChartData = params => {
  return service({
    url: baseUrl + '/video/cluster/_dimensionstat',
    method: 'get',
    params
  })
}

export const uploadIpAddress = (data) => {
  return service({
    url: baseUrl + '/video/cluster/_uploadproxyserverlist',
    method: 'post',
    data
  })
}

export const getIpAddressList = (params) => {
  return service({
    url: baseUrl + '/video/cluster/_proxyserverlist',
    method: 'get',
    params
  })
}

export const batchVisit = (data) => {
  return service({
    url: baseUrl + '/video/cluster/_batchvisit',
    method: 'post',
    data
  })
}
